﻿var person=['01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16']
function initate() {
	var point=document.getElementsByClassName("wrap");
	for(var index=0;index<person.length;index++){
	point[index].textContent=person[index];
	}
	setInterval(rand,100);
}
var press=0;
var name="";
function rand(){
	if(press%2==1){
	for(let i=0;i<person.length;i++){
			document.getElementsByClassName("wrap")[i].style.backgroundColor="pink";
		}
		let index=Math.floor(Math.random()*person.length);
		document.getElementsByClassName("wrap")[index].style.backgroundColor="#eee4da";
		name=document.getElementsByClassName("wrap")[index].textContent;
	}
}
function strNStp(){
	press++;
	document.getElementById("name").textContent=name;
}